#ifndef MAINWINDOW_H
#define MAINWINDOW_H


#include <QMainWindow>
#include <QProcess>
#include <QTextCodec>
#include <QDebug>
#include "windows.h"
#include <QMessageBox>
#include <QHttpMultiPart>
#include <QNetworkReply>
#include <QFile>
#include <QClipboard>
#include <QMimeData>

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    bool unlocked;

private:
    Ui::MainWindow *ui;
    QString host;
    QProcess *myProcess;
    void startTests();
    void startTestOne();
    void startTestTwo();
    QString data; // used to store all StdOut of executed processes
    void getKey();
    void uploadData(QString);
    bool verifying;
    QUrl pasteLink;
    int agreePastebin();
    QString generatedHtml;

private slots:
    void on_autoUpload_clicked(bool checked);
    void on_pushButtonGenerate_clicked();
    void on_uploadButton_clicked();
    void on_pushButton_clicked();
    void oneFinished(int);
    void twoFinished(int);
    void verifyKey(QNetworkReply*);
    void verifyUpload(QNetworkReply*);
    void copyHtmlToClipboard();
public slots:
    void processData();

};

#endif // MAINWINDOW_H
